<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>未完成项目视频监控</title>
</head>
<script src="js/jquery-3.5.1.js"></script>
<script src="js/vue.js"></script>
<script src="layui/layui.js"></script>
<link rel="stylesheet" href="/camera/layui/css/layui.css">
<body>
<div id="app">

    <br><br><h1 style="margin-left: 100px">视频监控列表</h1>
<div  v-for="project in projects" style="margin-left: 100px"><br><br>
<button class="layui-btn layui-btn-lg layui-btn-normal" @click="checkCamera()">{{project.projectAddress}}</button>
</div>
</div>
<script>
    var app=new Vue({
        el: "#app",
        data: {
            projects: null,

            //定义查询条件对象
        },
        created: function () {
            _this = this;
            this.selectByDept();
        },
        methods:{
                selectByDept:function ()  {
                    $.ajax({
                        url: "/camera/getProjects",
                        type: "get",
                        dataType: "json",
                        success: function (data) {
                            _this.projects = data.data;

                        }
                    })
                },
            checkCamera:function () {
            location.href="test.html";
            }
            }


    })
</script>
</body>
</html>